//
//  ViewController.m
//  AIRatingView
//
//  Created by Ailix on 15/4/2.
//  Copyright (c) 2015年 Ailix. All rights reserved.
//

#import "ViewController.h"
#import "AIRatingView.h"
#import "AIMacro.h"


@interface ViewController ()<AIRatingViewDelegate>
@property (weak, nonatomic) IBOutlet AIRatingView *ratingView;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.ratingView.notSelectedImage = [UIImage imageNamed:@"evaluateBigNo"];
    self.ratingView.halfSelectedImage = [UIImage imageNamed:@"evaluateBigHalf"];
    self.ratingView.fullSelectedImage = [UIImage imageNamed:@"evaluateBigYes"];
    self.ratingView.delegate = self;
//    self.ratingView.editable = NO;
//    self.ratingView.middleMargin = 10.;
//    self.ratingView.sideMargin = 5.;
    //    self.ratingView.currentRating = 3;
//    self.ratingView.maxRating = 10;
    
    // Do any additional setup after loading the view, typically from a nib.
}


- (void)ratingView:(AIRatingView *)ratingView didUpdateRating:(CGFloat)currentRating
{
//    DLog(@"%f",currentRating);
    self.statusLabel.text = [NSString stringWithFormat:@"%@",@(currentRating)];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
